In electricity generation, an electric generator is a device that converts mechanical energy to electrical energy. A generator forces electric current to flow through an external circuit. The source of mechanical energy may be a reciprocating or turbine steam engine, water falling through a turbine or waterwheel, an internal combustion engine, a wind turbine, a hand crank, compressed air, or any other source of mechanical energy. Generators provide nearly all of the power for electric power grids.
The reverse conversion of electrical energy into mechanical energy is done by an electric motor, and motors and generators have many similarities. Many motors can be mechanically driven to generate electricity and frequently make acceptable generators.